package com.test;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Test;

import com.action.Action;
import com.business.BusinessIpml;
import com.business.SearchBusinessImpl;
import com.dao.Address;
import com.dao.Business;
import com.dao.DAOIpml;
import com.dao.DAObusinessImpl;

public class test1 {
	
	// Test the  funtion "listSearchAddressDAO" of class DAOIpml
	@Test
	public void test_listSearchAddressDAO() {
		//fail("Not yet implemented");
		String postcode = "data do not live in database";
		String street = "";
		String town = "";
		DAOIpml daoIpml = new DAOIpml();
		List<Address> addresses = null;
		addresses = daoIpml.listSearchAddressDAO(postcode, street, town);
		assertEquals(0, addresses.size());
	}
	// Test the  funtion "listSearchBusinessDAO" of class DAObusinessImpl
	@Test
	public void test_listSearchBusinessDAO() {
		//fail("Not yet implemented");
		String businessName = "FPT";
		String sicCode = "";
		List<Business> businesses   = null;
		DAObusinessImpl daObusinessImpl = new DAObusinessImpl();
		businesses = daObusinessImpl.listSearchBusinessDAO(businessName, sicCode);
		assertEquals(0, businesses.size());
	}
	// Test the  funtion "listSearchAddress" of class BusinessIpml
	@Test
	public void test_listSearchAddress() {
		//fail("Not yet implemented");
		String postcode = "";
		String street = "data do not live in database";
		String town = "";
		BusinessIpml businessIpml = new BusinessIpml();
		List<Address> addresses = null;
		addresses = businessIpml.listSearchAddress(postcode, street, town);
		assertEquals(0, addresses.size());
	}
	// Test the  funtion "listSearchBusiness" of class SearchBusinessImpl
	@Test
	public void test_listSearchBusiness() {
		//fail("Not yet implemented");
		String businessName = "data do not live in database";
		String sicCode = "";
		List<Business> businesses   = null;
		SearchBusinessImpl searchBusinessImpl = new SearchBusinessImpl();
		businesses = searchBusinessImpl.listSearchBusiness(businessName, sicCode);
		assertEquals(0, businesses.size());
	}
	// Test function "search" of class Action
	@Test
	public void test_search() {
		//fail("Not yet implemented");
		Address address = new Address();
		address.setPostcode("");
		address.setStreet("");
		address.setTown("");
		Action action = new Action();
		String test = null;
	    test = action.search();
		assertNull(test);
	}


}
